<?php
// +----------------------------------------------------------------------
// | PHP [ JUST YOU ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2017 http://www.jyphp.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: FlyingPig <flyingpigfp@163.com>
// +----------------------------------------------------------------------

namespace App\Logic;


class Logic
{

    private static $logic;

    /**
     * @return static
     */
    public static function instance()
    {
        //判断当前的logic对象是否已经实例化过
        if (isset(self::$logic[static::class])) {
            return self::$logic[static::class];
        }
        self::$logic[static::class] = new static();
        return self::$logic[static::class];
    }
}